package kioscodeal

import org.codehaus.groovy.grails.commons.GrailsApplication

class ApplicationTagLib {
	
	GrailsApplication grailsApplication;
	
	def isOnline = { attrs, body ->		
	
		if(appIsOnline()){		
			out << body()
		}
	}
	
	def isOffline = { attrs, body ->	
		
		if(!appIsOnline()){		
			out << body()
		}	
	}	
	
	def appIsOnline(){
		return grailsApplication.config.online
	}
}
